<template>
     <header>
        <ul class="flex">
            <li>
                <div class="fl" @click="onClickBack">
                    <a class="fl back_icon" href="#"></a>
                    <span class="fl" v-text="back"></span>
                </div>
                <span class="fl close" v-text="close" @click="onClickClose"></span>
            </li>
            <li>
                <h1 v-text="headerMeg.title"></h1>
            </li>
            <li>
            </li>
        </ul>
    </header>
</template>

<script>
export default {
    name: 'header',
    data () {
        return {
            close: '关闭',
            back: '返回',
            isBack: false
        }
    },
    props: {
        'headerMeg': {
            type: Object,
            default () {
                return {
                    title: '订单详情'
                }
            }
        }
    },
    methods: {
        onClickBack () {
            if (this.isBack) {
                window.history.back();
            }
        },
        onClickClose () {
            console.log('close')
        }
    }
}
</script>